/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package e.odbo.data.dao;

import e.odbo.data.bean.I_BaseBean;
import e.odbo.data.dao.table.TableDefinition;

/**
 * @author Administrator
 */
public abstract class SectionDAO<T extends I_BaseBean, V extends BaseDAO> extends BaseDAO<T> {
    private V base;
    private final int[] columnIndexs;

    public SectionDAO(V base, int[] columnIndexs) {
        super(base.s);
        this.base = base;
        this.columnIndexs = columnIndexs;
    }

    public SectionDAO(EntityManager entityManager,V base,int[] columnIndexs){
        this(base,columnIndexs);
        entityManager.addDaoToMap(this);
    }

    @Override
    public TableDefinition getTable() {
        return base.getTableBuilderWarp().getTable().getInfoTableDefinition(columnIndexs);
    }
}
